/*
 * Created by Jaren at 2021/10/29 10:10
 */
import 'package:binary/binary.dart';
import 'package:inmotion_protocol/common/product_model.dart';
import 'package:inmotion_protocol/common/product_version.dart';
import 'package:inmotion_protocol/lorin/bean/base/settings.dart';

abstract class EucSettings extends AbsSettings {
  Uint4 driveMode = Uint4.zero; // 驱动模式
  Uint8 comfortableDriveModePedalSensitivity =
      Uint8.zero; // 舒适模式下踏板软硬度，单位1%，范围0-100
  Uint8 classicDriveModePedalSensitivity =
      Uint8.zero; // 经典模式下踏板软硬度，单位1%，范围0-100
  Uint4 ridingMode = Uint4.zero; // 驱动模式
  Uint8 volume = Uint8.zero; // 音量，单位1%，范围0-100
  Uint16 standbyTime = Uint16.zero; // 待机时长，单位min，0代表永不关机

  Uint4 liftedState = Uint4.zero; // 提手按键开关（防飞转开关）

  Uint4 lockState = Uint4.zero; // 锁车开关
  Uint4 transportModeState = Uint4.zero; // 运输模式开关
  Uint4 loadDetect = Uint4.zero; // 负载检测
  Uint4 noLoadDetect = Uint4.zero; // 空载检测
  Uint4 lowBatteryMode = Uint4.zero; // 低电骑行模式
  Uint4 lowBatterySafeMode = Uint4.zero; // 低电安全模式
  Uint4 lowBatteryWakeUpMode = Uint4.zero; // 低电唤醒模式
  Uint4 showTboxInfo = Uint4.zero; // 显示云盒相关信息

  Uint4 soundWave = Uint4.zero; // 主动声浪开关
  Uint8 soundWaveSensitivity = Uint8.zero; // 主动声浪灵敏度
  Uint4 usbPower = Uint4.zero; // USB电源开关
  Uint4 remainderRangeEstimate = Uint4.zero; // 剩余里程估算开关
  Uint4 assistBalance = Uint4.zero; // 助力平衡模式
  Uint4 speedingBrakingFeedbackState = Uint4.zero; // 加减速反馈控制
  Uint8 speedingFeedback = Uint8.zero; // 加速反馈
  Uint8 brakingFeedback = Uint8.zero; // 加速反馈

  Uint16 limitSpeed = Uint16.zero; // 限速值
  Int16 pitchAngleZero = Int16.zero; // 平衡角度零点
  Uint32 soundPackId = Uint32.zero; // 音效包id
  Uint4 soundState = Uint4.zero; // 音效包开关

  EucSettings(ProductModel model, VersionWrapper version)
      : super(model, version);

  @override
  String toString() {
    var str =
        'EucSettings{driveMode: $driveMode, comfortableDriveModePedalSensitivity: $comfortableDriveModePedalSensitivity, classicDriveModePedalSensitivity: $classicDriveModePedalSensitivity, ridingMode: $ridingMode, volume: $volume, standbyTime: $standbyTime, liftedState: $liftedState, lockState: $lockState, transportModeState: $transportModeState, loadDetect: $loadDetect, noLoadDetect: $noLoadDetect, lowBatteryMode: $lowBatteryMode, lowBatterySafeMode: $lowBatterySafeMode, soundWave: $soundWave, soundWaveSensitivity: $soundWaveSensitivity, usbPower: $usbPower, remainderRangeEstimate: $remainderRangeEstimate, assistBalance: $assistBalance, speedingBrakingFeedbackState: $speedingBrakingFeedbackState, speedingFeedback: $speedingFeedback, brakingFeedback: $brakingFeedback, limitSpeed: $limitSpeed, pitchAngleZero: $pitchAngleZero, soundPackId: $soundPackId, soundState: $soundState}';
    return str;
  }
}
